package com.jubaopen.dao.ibatis;

import com.jubaopen.bean.TradeHistory;
import com.jubaopen.dao.TradeHistoryDAO;

public class TradeHistoryDA0Impl extends BaseIBatisDao implements
		TradeHistoryDAO {

	@Override
	public int add(TradeHistory tradeHistory) {
		return (Integer) this.getSqlMapClientTemplate().insert("TradeHistoryMapper.insert", tradeHistory);
	}

	@Override
	public TradeHistory getOneByPaymentNo(String paymentNo) {
		return (TradeHistory) this.getSqlMapClientTemplate().queryForObject("TradeHistoryMapper.getByPaymentNo", paymentNo);
	}

	@Override
	public int update(TradeHistory tradeHistory) {
		return this.getSqlMapClientTemplate().update("TradeHistoryMapper.update", tradeHistory);
	}

}
